package java.com.tool;

import java.io.UnsupportedEncodingException;

public class TestCase {

    public static void main(String[] args) {

        String account = "621019789060117";
        String currCode = "01";
        String accoumtType = "902";

        if ("01".equals(currCode) && ("901".equals(accoumtType) || (account.startsWith("621019") && "6".equals(account.substring(10, 11))))) {
            System.out.println("right");
        } else {
            System.out.println("error");
        }



    }

    public static String encode(String str) {
        if (str == null) {
            return str;
        }
        if (str.length() == 0) {
            return str;
        }

        String ret = "";
        for (int i = 0; i < str.length(); i++) {

        }
        return ret;
    }

    public static void code() throws UnsupportedEncodingException {
        System.out.println("中文");

        System.out.println("中文".getBytes());

        System.out.println("中文".getBytes("GB2312"));

        System.out.println("中文".getBytes("ISO8859_1"));

        System.out.println(new String("中文".getBytes()));

        System.out.println(new String("中文".getBytes(), "GB2312"));

        System.out.println(new String("中文".getBytes(), "ISO8859_1"));

        System.out.println(new String("中文".getBytes("GB2312")));

        System.out.println(new String("中文".getBytes("GB2312"), "GB2312"));

        System.out.println(new String("中文".getBytes("GB2312"), "ISO8859_1"));

        System.out.println(new String("中文".getBytes("ISO8859_1")));

        System.out.println(new String("中文".getBytes("ISO8859_1"), "GB2312"));

        System.out.println(new String("中文".getBytes("ISO8859_1"), "ISO8859_1"));

//        eg:判断当前字符串的编码格式。
//判断当前字符串的编码格式
        String destination = null;
        if (destination.equals(new String(destination.getBytes("iso8859-1"), "iso8859-1")))
            destination = new String(destination.getBytes("iso8859-1"), "utf-8");
    }
}
